package com.fjec.common.shiro;

import com.fjec.common.enums.EnumLoginType;
import org.apache.shiro.authc.UsernamePasswordToken;

import javax.annotation.Nullable;
import java.util.Map;

public class MyUserToken extends UsernamePasswordToken {

    /**
     * 登录方式
     */
    private EnumLoginType loginType;

    private Map<String, Object> data;

    public MyUserToken(String username, String password, EnumLoginType loginType, @Nullable Map<String, Object> data) {
        super(username, password);
        this.loginType = loginType;
        this.data = data;
    }

    public EnumLoginType getLoginType() {
        return loginType;
    }

    public void setLoginType(EnumLoginType loginType) {
        this.loginType = loginType;
    }

    public Map<String, Object> getData() {
        return data;
    }

}
